export const dealParams = (val) => {
  const timeList = ['shipment_time'];
  const timeKeys = ['start_time', 'end_time'];
  let obj = {};
  for (const key in val) {
    if (timeList.includes(key)) {
      const {start, end} = val[key];
      obj.dateRange = {
        type: key,
        value: [`${start} 00:00:00`, `${end} 23:59:59`],
        range: true,
        rangeKeys: timeKeys,
      };
    } else {
      obj[key] = val[key];
    }
  }

  return obj;
};